﻿<%@ Page Language="C#" MasterPageFile="~/Theme/Stander/Stander.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Bill_Default" Title="Untitled Page" %>
<%@ Import Namespace="Active.Core" %>
<%@ Import Namespace="Active.Core.State" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="searchform">
    <fieldset>
        <legend>清单查询</legend>
      <span>年份: <asp:DropDownList ID="ddlYear" runat="server"></asp:DropDownList></span>
      <span>月份: <asp:DropDownList ID="ddlMonth" runat="server">
        <asp:ListItem Selected="True" Value="0">所有月份</asp:ListItem>
        <asp:ListItem Value="1">1月</asp:ListItem>
        <asp:ListItem Value="2">2月</asp:ListItem>
        <asp:ListItem Value="3">3月</asp:ListItem>
        <asp:ListItem Value="4">4月</asp:ListItem>
        <asp:ListItem Value="5">5月</asp:ListItem>
        <asp:ListItem Value="6">6月</asp:ListItem>
        <asp:ListItem Value="7">7月</asp:ListItem>
        <asp:ListItem Value="8">8月</asp:ListItem>
        <asp:ListItem Value="9">9月</asp:ListItem>
        <asp:ListItem Value="10">10月</asp:ListItem>
        <asp:ListItem Value="11">11月</asp:ListItem>
        <asp:ListItem Value="12">12月</asp:ListItem>
      </asp:DropDownList></span>
      <span><asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="搜   索" /></span>
    </fieldset>
</div>
<h2>清单列表</h2>
<asp:GridView ID="BillsGridView" runat="server" AutoGenerateColumns="False" CssClass="normal mouseOver"
    DataKeyNames="Id" DataSourceID="BillsDataSource">
    <Columns>
        <asp:HyperLinkField DataNavigateUrlFields="Id"
            DataNavigateUrlFormatString="~/BalanceTable.aspx?id={0}" Text="收支表" />
        <asp:HyperLinkField DataNavigateUrlFields="Id" DataNavigateUrlFormatString="Bill.aspx?id={0}"
             DataTextField="Number" HeaderText="清单编号" />
        <asp:TemplateField HeaderText="处理状态">
            <ItemTemplate>
                <span class="audit"><%# Formater.GetStateText(Eval("StateValue"))%>
                </span>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="产品名称">
            <ItemTemplate>
                <asp:Label ID="lblUnitPrice" runat="server" Text='<%#Eval("ProductName") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="投放日期">
            <ItemTemplate>
                <asp:Label ID="lblRealIncome" runat="server" Text='<%# Eval("StartDate", "{0:yyyy-M-d}") +"~"+ Eval("EndDate", "{0:yyyy-M-d}") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <EmptyDataTemplate>
        暂无清单信息
    </EmptyDataTemplate>
</asp:GridView>
<csla:CslaDataSource ID="BillsDataSource" runat="server" 
    TypeName="Active.Core.BillList, Active.Core" OnSelectObject="BillsDataSource_SelectObject"
    TypeSupportsPaging="False" TypeSupportsSorting="False">
</csla:CslaDataSource>
<webdiyer:aspnetpager id="aspnetPager" runat="server" OnPageChanged="aspnetPager_PageChanged"
    PageSize="15"></webdiyer:aspnetpager>
</asp:Content>

